<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>缺陷管理>>缺陷类型确认</title>

    <link rel="stylesheet" href="../layui/layui.all.js"  media="all">
</head>
<body>
<div style="padding:10px;background-color: #F2F2F2;">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">缺陷管理>>缺陷类型确认</div>
                <div class="layui-card-body">
                    <!--数据表格-->
                    <table class="layui-hide" id="defect_table" lay-filter="defect_table"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<!--选中区域-->
<script type="text/html" id="toolbarDemo">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="add_defect">添加缺陷类型</button>
    </div>
</script>
<script type="text/javascript">
    $(function () {
        var defect = sessionStorage.getItem("defect");
        if(defect != null){
            defect = JSON.parse(defect);
            $("#emp_name").text(defect.emp_name);
        }else{
//            window.location.href = "/login.html";
        }
    });
</script>
<script>
    layui.use(['table','layer'], function() {
        var table = layui.table
        ,layer=layui.layer;
        table.render({
            elem: '#defect_table'
            , url: '/queryDefectType.do'
            , toolbar: '#toolbarDemo'
            ,title:'缺陷类型表'
            , totalRow: false
            , cols: [[
                {field: 'line_id', title: '线路编号', edit: 'text'}
                , {field: 'tower_id', title: '杆塔编号', edit: 'text'}
                , {field: 'defect_grade', title: '缺陷等级', edit: 'text'}
                , {field: 'intact', title: '缺陷类型', edit: 'text'}
                , {field: 'defect_des', title: '缺陷描述', edit: 'text'}
                , {field: 'user_id', title: '发现人员', edit: 'text'}
                , {field: 'find_time', title: '发现时间', edit: 'text'}
            ]]
            , page: {
                limits: [5, 10, 15, 20]
            }
        });
    });
</script>
</body>
</html>